package com.yuexun.beilunpatient.ui.my.model.impl;


import com.yuexun.beilunpatient.ui.bean.BaseListEntity;
import com.yuexun.beilunpatient.ui.my.api.OutLoginApi;
import com.yuexun.beilunpatient.ui.my.model.ILoginOutModel;
import com.yuexun.beilunpatient.utils.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by chenss on 2018/3/14 0014.
 */

public class LoginOutModel implements ILoginOutModel {

    private OutLoginApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public OutLoginApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(OutLoginApi.class);
        }
    }

    @Override
    public Observable<BaseListEntity> outLogin(Map<String, String> praise) {
        api = ApiInstance();
        return api.loginOut(praise);
    }
}
